test_scanner_sources = [
  '../../main.cpp',
  'test_scanner.cpp',
]

test_scanner_abi_sources = [
  '../../main.cpp',
  'test_scanner_abi.cpp',
]

test_scanner = executable(
  'test_scanner',
  test_scanner_sources,
  include_directories: [
    include_directories('.'),
    include_directories('../../..'),
    include_directories('../../../drivers/scanner'),
    include_directories('../../../drivers/scanner/scanner'),
    include_directories('../../../drivers/internal'),
    include_directories('../../../include'),
    include_directories('../../../gen'),
  ],
  dependencies: [
    gtest_dep,
    test_utilities_dep,
    libmcpp_deps,
    internal_dep,
    test_utils_dep,
  ],
  cpp_args: ['-DUNIT_TEST'],
  install: false,
  link_whole: [scanner_static_lib],
)

test_scanner_abi = executable(
  'test_scanner_abi',
  test_scanner_abi_sources,
  include_directories: [
    include_directories('.'),
    include_directories('../../..'),
    include_directories('../../../drivers/scanner'),
    include_directories('../../../drivers/scanner/scanner'),
    include_directories('../../../drivers/internal'),
    include_directories('../../../include'),
    include_directories('../../../gen'),
  ],
  dependencies: [
    gtest_dep,
    test_utilities_dep,
    test_utils_dep,
    libmcpp_deps,
    internal_dep,
  ],
  cpp_args: ['-DUNIT_TEST'],
  install: false,
  link_whole: [scanner_static_lib],
)

test('test_scanner', test_scanner, timeout: 300, suite: 'scanner')
test('test_scanner_abi', test_scanner_abi, timeout: 300, suite: 'scanner')